﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;

//namespace Tradex.ComponentModel {

//    /// <summary>
//    /// The RingBuffer implements a never ending buffer that can be used to store data. Data can be added
//    /// at the beginning and taken out at the end. This is similar to a queue and a list in behavior. The advantage
//    /// is that insertions and removals from the end of the RingBuffer do not result in copy operations.
//    /// 
//    /// Ringbuffers are usefull for any data storage where items are primarily added to one end and removed from the
//    /// other end.
//    /// </summary>
//    /// <typeparam name="T"></typeparam>
//    public class RingBuffer<T> {

//        /// <summary>
//        /// Creates a new RingBuffer with the given capacity.
//        /// </summary>
//        /// <param name="capacity">The capacity of the buffer. Defaults to 256.</param>
//        public RingBuffer (int capacity = 256) {
//            _Buffer = new T[capacity];
//        }

//        T [] _Buffer;
//        int _Size = 0;

//        /// <summary>
//        /// Gets or sets a specific instance of the RingBuffer.
//        /// </summary>
//        /// <param name="index"></param>
//        /// <returns></returns>
//        T this [int index] {
//            get {
//                return default(T);
//            }
//            set {
//            }
//        }

//        /// <summary>
//        /// Returns the capacity of the RingBuffer, i.e. the maximum number of items it can store.
//        /// </summary>
//        public int Capacity {
//            get { return _Buffer.Length; }
//        }

//        /// <summary>
//        /// Gets size of the RingBuffer instance.
//        /// </summary>
//        public int Size {
//            get { return _Size; }
//        }

//        /// <summary>
//        /// Adds an item at the front of the buffer.
//        /// </summary>
//        /// <param name="item"></param>
//        public void AddFirst(T item) {
//        }

//        /// <summary>
//        /// Add the enumeratoed elements at the top of the buffer.
//        /// </summary>
//        /// <param name="items"></param>
//        /// <param name="skip"></param>
//        /// <param name="add"></param>
//        public void AddFirst(IEnumerable<T> items, int skip, int add) {
//        }

//        /// <summary>
//        /// Removes the last element from the RingBuffer.
//        /// </summary>
//        public void RemoveLast() {
//        }

//    }

//}
